﻿using System.ComponentModel.Composition;

namespace MediaAssistant.Management
{
    [Export]
    public class BackgroundScannerManager
    {
        [Import]
        private IMDBMovieScanner IMDBMovieScanner { get; set; }
        [Import]
        private MediaFileScanner MediaFileScanner { get; set; }
        [Import]
        public MusicTagFileSynchronizer MusicTagFileSynchronizer { get; set; }
        [Import]
        public MusicTagDataSynchronizer MusicTagDataSynchronizer { get; set; }
        //[Import]
        //private MusicDurationUpdater MusicDurationUpdater { get; set; }
        [Import]
        public SmartDJProbabilityCalculationService SmartDjProbabilityCalculationService { get; set; }
        public void Start()
        {
            IMDBMovieScanner.Start();
            MediaFileScanner.Start();
            //MusicDurationUpdater.Start();
            MusicTagFileSynchronizer.Start();
            MusicTagDataSynchronizer.Start();
            SmartDjProbabilityCalculationService.Start();
        }
        public void Stop()
        {
            IMDBMovieScanner.Stop();
            MediaFileScanner.Stop();
            //MusicDurationUpdater.Stop();
            MusicTagFileSynchronizer.Stop();
            MusicTagDataSynchronizer.Stop();
            SmartDjProbabilityCalculationService.Stop();
        }
        public void Pause()
        {
            IMDBMovieScanner.Pause();
            MediaFileScanner.Pause();
            //MusicDurationUpdater.Pause();
            MusicTagFileSynchronizer.Pause();
            MusicTagDataSynchronizer.Pause();
            SmartDjProbabilityCalculationService.Pause();
        }
        public void Resume()
        {
            IMDBMovieScanner.Resume();
            MediaFileScanner.Resume();
            //MusicDurationUpdater.Resume();
            MusicTagFileSynchronizer.Resume();
            MusicTagDataSynchronizer.Resume();
            SmartDjProbabilityCalculationService.Resume();
        }
    }
}
